<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;



// ++++++++++++++++++++ API 后台接口 Begin ++++++++++++++++++++ //
// ++++++ 管理员 ++++++ //
// 登录
Route::rule('web/login','admin/Auth/doLogin');
// 退出
Route::rule('web/logout','admin/Auth/logout');
// 修改密码
Route::rule('web/setPassword','admin/Auth/setPassword');


// ++++++ 用户 ++++++ //
// 获取 openID
Route::rule('web/token/user','admin/Token/getToken');
// 获取用户信息
Route::rule('web/getUserinfo','admin/UserInfo/getUserInfo');
// 保存用户信息
Route::rule('web/saveUserInfo','admin/UserInfo/getUserInfo');


// 首页数据
Route::rule('web/getHomeFrame','admin/HomeFrame/getHomeFrame');
// 收益
Route::rule('web/profit/getHomeFrame','admin/Profit/getHomeFrame'); // 首页
Route::rule('web/profit/getList','admin/Profit/getList'); // 列表
// 提现
Route::rule('web/withdraw/getHomeFrame','admin/Withdraw/getHomeFrame'); // 首页
Route::rule('web/withdraw/getList','admin/Withdraw/getList'); // 列表
Route::rule('web/withdraw/pay','admin/Withdraw/pay'); // 支付
Route::rule('web/withdraw/notify','admin/Withdraw/receiveNotify'); // 支付回调


// 店铺
Route::rule('web/store/getStoreHome','admin/Store/getStoreHome'); // 店铺首页
Route::rule('web/store/getTypeTree','admin/Store/getTypeTree'); // 分类
Route::rule('web/store/getStoreDetail','admin/Store/detail'); // 店铺详情
Route::rule('web/store/delete','admin/Store/delete'); // 删除店铺
Route::rule('web/store/handle','admin/Store/handle'); // 审核通过/店铺上架/下架


// 分类
Route::rule('web/type/getTypeList','admin/Type/getList'); // 列表
Route::rule('web/type/saveType','admin/Type/save'); // 添加/编辑
Route::rule('web/type/delete','admin/Type/delete'); // 删除
Route::rule('web/type/move','admin/Type/move'); // 上移/下移

// 广告位
Route::rule('web/getAdvertiselocalList','admin/Advertiselocal/getList'); // 列表
Route::rule('web/saveAdvertiselocal','admin/Advertiselocal/save'); // 添加/编辑
Route::rule('web/deleteAdvertiselocal','admin/Advertiselocal/delete'); // 删除

// 轮播/橱窗广告
Route::rule('web/getAdvertiselocalTree','admin/Advertise/getAdvertiselocalTree'); // 广告位
Route::rule('web/advertise/getList','admin/Advertise/getList'); // 列表
Route::rule('web/advertise/save','admin/Advertise/save'); // 添加/编辑
Route::rule('web/advertise/delete','admin/Advertise/delete'); // 删除
Route::rule('web/advertise/handleShelf','admin/Advertise/handleShelf'); // 上架/下架
Route::rule('web/advertise/checkExist','admin/Advertise/checkExist'); // 检查是否已有投放
// 广告投放
//Route::rule('web/advertise/putIn','admin/Advertise/putIn');

// 优惠券
Route::rule('web/ticket/getList','admin/Ticket/getList'); // 列表
Route::rule('web/ticket/getDetail','admin/Ticket/detail'); // 详情
Route::rule('web/ticket/handleShelf','admin/Ticket/handleShelf'); // 上架/下架

// 分销会员
Route::rule('web/user/getList','admin/User/getList'); // 列表
//Route::rule('web/user/pass','admin/User/pass'); // 通过
Route::rule('web/user/delete','admin/User/delete'); // 删除
Route::rule('web/user/handle','admin/User/handle'); // 通过/启用/禁用

// 业主
Route::rule('web/getAskpricerecordList','admin/Askpricerecord/getList'); // 列表
Route::rule('web/getAskpricerecordDetail','admin/Askpricerecord/detail'); // 详情
Route::rule('web/deleteAskpricerecord','admin/Askpricerecord/delete'); // 删除


// ++++++ 订单 ++++++ //
Route::rule('web/order/getOrderList','admin/Order/getList'); // 列表


// ++++++ 设置 ++++++ //
// 提现设置
Route::rule('web/withdrawconfig/detail','admin/Withdrawconfig/detail'); // 详情
Route::rule('web/withdrawconfig/saveSet','admin/Withdrawconfig/saveSet'); // 保存设置
// 答疑设置
Route::rule('web/faq/getList','admin/Faq/getList'); // 列表
Route::rule('web/faq/detail','admin/Faq/detail'); // 详情
Route::rule('web/faq/save','admin/Faq/save'); // 添加/编辑
Route::rule('web/faq/delete','admin/Faq/delete'); // 删除
// 账号设置
Route::rule('web/admin/getList','admin/Admin/getList'); // 列表
Route::rule('web/admin/save','admin/Admin/save'); // 添加/编辑
Route::rule('web/admin/delete','admin/Admin/delete'); // 删除
// 权限设置
Route::rule('web/admin/getRule','admin/Admin/getRule'); // 获取权限
//Route::rule('web/admin/setRule','admin/Admin/setRule'); // 权限保存


// ++++++++++++ 通用 ++++++++++++ //
// 上传单张图片
Route::rule('web/uploadOneImg','admin/Common/uploadOneImg');
// 删除单张图片
Route::rule('web/delOneImg','admin/Common/delOneImg');
// ++++++++++++++++++++ API 后台接口 End ++++++++++++++++++++ //



// ++++++++++++++++++++ API 前端接口 Begin ++++++++++++++++++++ //
Route::post('wx/index','api/Home/index');
Route::post('wx/getUser','api/Token/getToken');
Route::rule('wx/uploadimg','api/Image/upload');
Route::rule('wx/getAllType','api/Home/getAllType');
Route::post('wx/getTypeName','api/Home/getTypeName');
Route::post('wx/getAdvertise','api/Home/getAdvertise');


Route::post('wx/getPhoneCode','api/Sms/sendsms');

Route::post('wx/store/add','api/Store/createMyStore');
Route::rule('wx/store/getStoreCode','api/Store/getStoreCode');


//微信支付
Route::post('wx/requestPayment','api/Pay/requestPayment');
Route::post('wx/adPayment','api/Ad/adPayment');
Route::post('api/pay/notify','api/Pay/receiveNotify');
Route::post('api/adpay/notify','api/Ad/receiveNotify');



//优惠券核销
Route::post('wx/ticket/writeoff','api/Ticket/WriteOffTicket');
Route::post('wx/ticket/create','api/Ticket/createTicket');
Route::post('wx/receiveTicket','api/Ticket/receiveTicket');
Route::rule('wx/bindRelationship','api/Member/bindRelationship');
Route::post('wx/getMember','api/Member/getMember');
Route::post('wx/myStore','api/Member/myStore');
Route::post('wx/bandUserInfo','api/Member/bandUserInfo');
Route::post('wx/myPocket','api/Member/myPocket');
//当前店铺订单
Route::post('wx/getStoreOrder','api/Store/getStoreOrder');
Route::post('wx/getRecommendStore','api/Home/getRecommendStore');


Route::post('wx/putforwardApply','api/Distribution/PutforwardApply');
Route::post('wx/MakeMoney','api/Distribution/MakeMoney');
Route::post('wx/putforwardRecord','api/Distribution/putforwardRecord');
Route::rule('wx/getaddress','api/Common/getaddress');


Route::rule('wx/getStoreTickets','api/Store/getStoreTickets');
Route::post('wx/storeTrades','api/Store/storeTrades');
Route::post('wx/storeTradez','api/Store/storeTradez');
Route::post('wx/getTicketDetails','api/Ticket/getTicketDetails');
Route::post('wx/getAllTickets','api/Ticket/getAllTickets');
Route::post('wx/receivedTicket','api/Ticket/receivedTicket');
Route::post('wx/getCancelRecord','api/Ticket/getCancelRecord');
Route::post('wx/deleteStoreTickets','api/Ticket/deleteStoreTickets');
Route::post('wx/getStoreDetails','api/Store/getStoreDetails');
Route::post('wx/getMyFocus','api/Store/getMyFocus');
Route::post('wx/getStoreByType','api/Store/getStoreByType');
Route::post('wx/storeSettlements','api/Store/storeSettlements');
Route::post('wx/searchStore','api/Common/searchStore');
Route::post('wx/focusStore','api/Common/focusStore');
Route::post('wx/addInStore','api/Common/addInStore');
Route::post('wx/shareInfo','api/Common/shareInfo');
Route::post('wx/getShareId','api/Common/getShareId');
Route::post('wx/getPlatRule','api/Common/getPlatRule');
Route::post('wx/editUser','api/User/editUser');
Route::post('wx/myTicket','api/User/myTicket');
Route::post('wx/myFocus','api/User/myFocus');
Route::post('wx/saveLabel','api/Label/saveLabel');
Route::post('wx/getAllLabel','api/Label/getAllLabel');
Route::post('wx/deleteLabel','api/Label/deleteLabel');
Route::post('wx/getCustomerList','api/Customer/getCustomerList');
Route::post('wx/getCustomerDetails','api/Customer/getCustomerDetails');

//广告
Route::rule('wx/getAdvertiseLocalInfo','api/Ad/getAdvertiseLocalInfo');
Route::post('wx/createAdvertise','api/Ad/createAdvertise');
Route::post('wx/getAdvertiseList','api/Ad/getAdvertiseList');


//询价
Route::rule('wx/countPrice','api/Askprice/countPrice');
Route::post('wx/askPriceRecord','api/Askprice/askPriceRecord');

Route::post('wx/getDistributeMemberF','api/Distribution/getDistributeMemberF');
Route::post('wx/buyTicketRecord','api/Distribution/buyTicketRecord');
Route::post('wx/subordinateDetails','api/Distribution/subordinateDetails');

Route::post('wx/putforwardrule','api/Distribution/putforwardrule');


// ++++++++++++++++++++ API 前端接口 End ++++++++++++++++++++ //

